import {defineStore} from 'pinia';

const systemStore = defineStore('systemStore', {
    state: () => ({
        userSearch: reactive({}),
        menuSearch: reactive({}),
        roleSearch: reactive({}),
        cityAreaSearch: reactive({}),
        dictSearch: reactive({}),
        dictItemSearch: reactive({}),
        deptSearch: reactive({}),
    }),
    getters: {
        getUserSearch() {
            return this.userSearch;
        },
        getMenuSearch() {
            return this.menuSearch;
        },
        getRoleSearch() {
            return this.roleSearch;
        },
        getCityAreaSearch() {
            return this.cityAreaSearch;
        },
        getDictSearch() {
            return this.dictSearch;
        },
        getDictItemSearch() {
            return this.dictItemSearch;
        },
        getDeptSearch() {
            return this.deptSearch;
        },
    },
    actions: {
        setUserSearch(data) {
            this.userSearch = data;
        },
        setMenuSearch(data) {
            this.menuSearch = data;
        },
        setRoleSearch(data) {
            this.roleSearch = data;
        },
        setCityAreaSearch(data) {
            this.cityAreaSearch = data;
        },
        setDictSearch(data) {
            this.dictSearch = data;
        },
        setDictItemSearch(data) {
            this.dictItemSearch = data;
        },
        setDeptSearch(data) {
            this.deptSearch = data;
        },
    }
});
export default systemStore;
